package br.ebula.apl.dao;

import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import br.ebula.apl.dto.DTOExcluiBula;

public class DAOExcluiBula  extends DAOGenerico{

	DTOExcluiBula dto;
	
	public void excluiBula(DTOExcluiBula dto) {
		try {
			this.dto = dto;
			ResultSet rs = executaProcedure("exclui_bula",1);
			rs.close();
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

	@Override
	void configuraParametros(CallableStatement cstmt) throws SQLException {
		cstmt.setInt(1, Integer.parseInt(dto.getBula().getCodigo()));
	}
}
